from selenium import webdriver
import time #导入time类
from selenium.webdriver.common.action_chains import ActionChains
driver = webdriver.Chrome()
driver.maximize_window()

driver.get('http://www.baidu.com')
driver.find_element_by_id("kw").send_keys('郑爽')

doubleclick=driver.find_element_by_id("su")
driver.implicitly_wait(30)
#隐式等待30秒
#刷新页面等待加载页面,最长等待30秒,如果30秒没有加载抛异常
ActionChains(driver).double_click(doubleclick).perform()

time.sleep(2)
# 延迟2秒
driver.quit()